home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MEMORY.SWG / 0011_MEMINFO2.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  1KB  |  34 lines

  1.  
  2.  I need the proper syntax For a Pascal Program that will execute a Dos
  3.  prog (a small one) and then resume the Pascal Program when the Dos prog
  4.  is finished.  Any suggestions gladly accepted...
  5.  
  6.    TP method:
  7.  
  8.    Assumes Programe name is \PROGPATH\PROGNAME.EXE, and the command
  9.    line parameters are /R
  10.  
  11.    Exec('\PROGPATH\PROGNAME.EXE','/R');
  12.  
  13.    You need to make sure that you have the Heap set With the $M
  14.    directives, so that you have enough memory to execute the
  15.    porgram.
  16.  
  17.    example (this Program doesn't use the heap at all):
  18.  
  19.    {$M 1024, 0, 0} { 1 kb stack, 0k min, 0k max }
  20.  
  21.    (this Program needs 20k minimum heap to run, and can use up to
  22.    100k)
  23.  
  24.    {$M 1024, 20480, 102400}  { 1k stack, 20k min, 100k max }
  25.  
  26.    A Turbo Pascal Program will always use as much RAM as there is
  27.    avaiable, up to the "max" limit. if you do not put a $M directive
  28.    in your Program, the heap will be the entire available memory of
  29.    your machine, so no memory will be available For your external
  30.    Program to run.
  31.  
  32.    It is also a good idea to bracket your Exec command with
  33.    "SwapVector;" statements.
  34.